package models;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import play.db.jpa.Model;
@Entity
public class UserRole extends Model {
	@ManyToOne
	public User user;
	@ManyToOne
	public Role role;
	
	public static List<UserRole> findByUser(User user){
		return UserRole.find("user=?", user).fetch();
	}
	
}
